package cn.hf.mychat.controller;

import cn.hf.mychat.constanst.Test;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/hf")
@RequiredArgsConstructor
public class EnumTest {

    @GetMapping("enum")
    public ResponseEntity test(){
        Map<String, Object> map = new HashMap<>();
        map.put("success","真香");
        String s = Test.convertTemplateContent(map, Test.SUCCESS);
        System.out.println("s = " + s);
        return ResponseEntity.ok(s);
    }
}
